<template>
  <div>
    <el-page-header @back="goBack" content="资产详情"> </el-page-header>
    <div class="ueba-detail-main">
      <el-tabs type="border-card" v-model="tabsName">
        <el-tab-pane label="资产信息">
          <base-info :formData="formData"></base-info>
        </el-tab-pane>
        <el-tab-pane label="风险列表">
          <risklist-table></risklist-table>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import baseInfo from "./components/baseInfo.vue";
import risklistTable from "./components/risklistTable.vue";
import {
  assetsSubsystemDetail
} from '@/api/propertyManage'
export default {
  name: "subsystemDetail",
  data() {
    return {
      tabsName: "",
      formData: {}
    }
  },
  mounted() {
    if (this.$route.query.id) {
      this.initData();
    }
  },
  components: {
    baseInfo,
    risklistTable
  },
  methods: {
    goBack() {
      this.$router.push("/property/subsystem/manage");
    },
    initData() {
      assetsSubsystemDetail({ id: this.$route.query.id }).then((res) => {
        this.formData = res.data
      })
    }
  }
}
</script>

<style scoped>

</style>
